package com.geostar.constructionland.analyse.mapper.sptalyresult;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.geostar.constructionland.analyse.entity.alyresult.tzhdlgdfx.AlyResultGdZlDb;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * @author yelll
 * @since 2020-6-11 14:29
 **/
public interface AlyResultGdzldbMapper extends BaseMapper<AlyResultGdZlDb> {
    @Select(" select fxid,zymj,tbdlmj from jsyd_fx_gdzlfx where dlid = #{dlid} order by tbdlmj desc," +
            " trunc(tbdlmj,1)-round(tbdlmj,0) ${sortType} ")
    List<AlyResultGdZlDb> getGdFxneedPc(@Param("dlid")String dlid,@Param("sortType")String sortType);

    @Update(" update jsyd_fx_gdzlfx t " +
            "set t.zymj = #{zymj}" +
            "where t.fxid = #{fxid} ")
    void updateGdzl(@Param("zymj") String zymj,@Param("fxid")String fxid);
}
